package com.feicheng.house.controller;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.feicheng.house.entity.DepositRecordClientUserVo;
import com.feicheng.house.result.ResultInfo;
import com.feicheng.house.service.IDepositRecordClientUserVoService;

/**
 * <p>
 * VIEW 前端控制器
 * </p>
 *
 * @author feichengTech
 * @since 2021-11-10
 */
@RestController
@RequestMapping("/house/deposit-record-client-user-vo")
public class DepositRecordClientUserVoController {

	@Autowired
	IDepositRecordClientUserVoService iDepositRecordClientUserVoService;
	/**
	 * 根据相关入参查询record表，若无全查询record表
	 * @param currentPage
	 * @param pageSize
	 * @param searchKey
	 * @param searchState	 
	 * @param actionRange 
	 * @return 查询到的押金记录和分页详情
	 */
	@GetMapping("/page")
	ResultInfo getList(
				@RequestParam(defaultValue = "1") Integer currentPage,
			    @RequestParam(defaultValue = "10")Integer pageSize,
			    String searchKey,
			    String searchState,
			    String actionRange) {
		return iDepositRecordClientUserVoService.selectAll(currentPage, pageSize, searchKey ,searchState, actionRange);
	}
	/**
	 * 根据押金记录单号查询对应记录
	 * @param depositNumber 记录单号
	 * @return 查询到的记录
	 */
	@GetMapping("/info")
	ResultInfo getRecord(String depositNumber){
	
	return iDepositRecordClientUserVoService.getRecord(depositNumber);
	
	}
}
